﻿''' <summary>
''' Hold description of print/image layout specification
''' </summary>
''' <remarks></remarks>
Public Class clsLayout
    Friend Property Name As String
    Friend Const MaxRows As Integer = 3
    Friend Const MaxCols As Integer = 2
    Friend Property NumRows As Integer = MaxRows
    Friend Property NumCols As Integer = MaxCols
    Friend Property AutoAssign As Boolean = False
    Friend Property Landscape As Boolean = False
    Friend Property Margins As Printing.Margins 'expressed in 100ths of an inch
    Friend Property RowColMargin As Double = 0.1 'express in inches
    Friend Property DrawBorders As Boolean = True
    Friend Property PageContents As New Generic.List(Of clsPaneContents)

    Public Sub New(Name As String)
        Me.Name = Name
        PageContents.Add(New clsPaneContents)
        Margins = New Printing.Margins(50, 50, 50, 50)
    End Sub

End Class

''' <summary>
''' Each page in layout contains array of panes, each referencing a tab or report; this class facilitates reference to that array
''' </summary>
Public Class clsPaneContents
    Private arPaneContents(clsLayout.MaxCols - 1, clsLayout.MaxRows - 1) As String

    Public Sub New()
        For r As Integer = 0 To clsLayout.MaxRows - 1
            For c As Integer = 0 To clsLayout.MaxCols - 1
                arPaneContents(c, r) = "None"
            Next
        Next
    End Sub

    Public Property Item(ColumnIndex As Integer, RowIndex As Integer) As String
        Get
            Return arPaneContents(ColumnIndex, RowIndex)
        End Get
        Set(value As String)
            arPaneContents(ColumnIndex, RowIndex) = value
        End Set
    End Property
End Class
